﻿<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>武汉理工大学计算机协会维修预约系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <script type="text/javascript" src="MyString.js"></script>

    <script type="text/javascript" src="XmlObject.js"></script>

    <script type="text/javascript" src="/js/jquery-1.10.2.min.js"></script>

    <script language="JavaScript" type="text/javascript">
        function checkInput() {
            var sdName = sUserName.value;
            var sdPassword = sUserPass.value; //50
            if (checkLength(sdName, 50) == false) return false;
            if (checkLength(sdPassword, 50) == false) return false;
        }
        function onSubmitClick() {
            checkInput();
            var sdName = sUserName.value;
            var sdPassword = sUserPass.value; //50
            $.ajax({
                url: "thj.asp",
                data: {
                    Action: "varify",
                    Name: sdName,
                    Pass: sdPassword
                },
                success: function(data) {
                    var oData = eval("(" + data + ");");
                    if (oData.msg == 'ok') {
                        window.location = "index.asp";
                    }
                    else if (oData.msg == "error") {
                        alert(oData.param);
                    }
                    else if (oData.msg == "unread") {
                        window.location = oData.param;
                    }
                }
            });
        }
        function checkLength(sText, nLenLimit) {
            if (sText.length > nLenLimit) return false;
            return true;
        }
        
    </script>

    <style type="text/css">
        .style1
        {
            width: 400px;
            margin: 0 auto;
        }
        .text_input
        {
            width: 100%;
        }
        .text_area
        {
            width: 100%;
            height: 100px;
        }
        .login
        {
            font-size: 15px;
        }
        .table_style
        {
            background-color: #FBF7FE;
            width: 400px;
            margin: 0 auto;
            padding: 10px;
        }
    </style>
</head>
<body>
    <%
    if request("Action")="logout" then
        response.Redirect("thj.asp?Action=logout")
    end if
    %>
    <div>
        武汉理工大学计算机协会电脑维护支持预约系统管理员登陆<br />
        <br />
        <br />
        <table style="width: 100%">
            <tr>
                <td>
                    <br />
                    <table class="table_style">
                        <tr row-type="data">
                            <td align="center" colspan="2">
                                管理员登陆
                            </td>
                        </tr>
                        <tr row-type="data">
                            <td style="width: 90px;">
                                用户代码
                            </td>
                            <td>
                                <input class="text_input" issave="true" fromvalue="true" type="text" id="sUserName"
                                    name="fname" />
                            </td>
                        </tr>
                        <tr row-type="data">
                            <td style="width: 90px;">
                                登陆密码
                            </td>
                            <td>
                                <input class="text_input" issave="true" fromvalue="true" id="sUserPass" type="password"
                                    name="fphone" />
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: center" colspan="2">
                                <input type="button" value="确认登陆" onclick="return onSubmitClick();" />
                            </td>
                        </tr>
                    </table>
                    说明：
                    <br />
                    1、查询密码是用于查询维修申请的处理状态时的身份验证，由<b>你自己</b>设定；<br />
                    2、提交后会有一个受理单号，这个单号由<b>系统生成</b>，用于查询申请的处理状态。
                </td>
            </tr>
        </table>
    </div>
</body>
</html>
